<ion-view id="tab-home" show-tabs>
  <ion-nav-bar class="bar-royal">
    <ion-nav-title><img class="tab-home__logo" src="img/app/logo-negative.svg"></ion-nav-title>
  </ion-nav-bar>

  <ion-content>
    <ion-refresher
     ng-if="isAndroid"
     pulling-icon="ion-ios-refresh"
     spinner="ios-small"
     on-refresh="onRefresh()">
   </ion-refresher>

   <div class="list card important-message ng-hide" ng-show="serverMessage">
     <div class="close-button" ng-click="serverMessage = null"><i class="icon ion-ios-close-empty"></i></div>
     <i class="item big-icon-svg">
       <img src="img/alert.svg" width="50" />
     </i>

     <div class="item alert">{{serverMessage.title}}</div>
     <div class="item message">{{serverMessage.body}}</div>

     <div class="button" ng-click="openServerMessageLink()">
       <span translate>Learn more</span>
     </div>
   </div>

    <div class="list card important-message ng-hide" ng-show="newRelease">
      <i class="item icon big-icon-svg">
        <img src="img/icon-update.svg" class="bg"/>
      </i>

      <div class="item title">{{updateText}}</div>

      <div class="button" ng-click="goToDownload()">
        <span translate>Download</span>
      </div>
    </div>

    <div class="ng-hide" ng-show="showRateCard.value" ng-include="'views/feedback/rateCard.html'"></div>
    <div class="list card homeTip" ng-if="homeTip">
      <div class="item item-icon-right item-heading">
        <a ng-click="hideHomeTip()"><i class="icon ion-ios-close-empty close-home-tip"></i></a>
      </div>
      <div>
        <i class="icon big-icon-svg">
          <img src="img/check-white.svg" class="bg green"/>
        </i>
      </div>
      <div class="title" translate>
        Your QYBcoin wallet is ready!
      </div>
      <div class="subtitle" translate>
        On this screen you can see all your wallets, accounts, and assets.
      </div>
    </div>

    <div class="list card" ng-hide="!txps[0]">
      <a class="item item-icon-right item-heading" ui-sref="tabs.proposals">
        {{'Payment Proposals'|translate}}
        <i class="icon bp-arrow-right"></i>
        <span class="badge badge-assertive m5t m10r" ng-show="txpsN>3"> {{txpsN}}</span>
      </a>

      <div ng-repeat="tx in txps" ng-click="openTxpModal(tx)">
        <a class="wallet-details__item item item-sub" ng-include="'views/includes/txp.html'"></a>
      </div>
    </div>

    <div class="list card" ng-if="notifications[0] && recentTransactionsEnabled">
      <a class="item item-icon-right item-heading" ui-sref="tabs.activity">
        <span translate>Recent Transactions</span>
        <i class="icon bp-arrow-right"></i>
        <span class="badge badge-assertive m5t m10r" ng-show="notificationsN>3"> {{notificationsN}}</span>
      </a>
      <a class="item item-sub activity" ng-repeat="notification in notifications" ng-click="openNotificationModal(notification)">
        <span ng-include="'views/includes/walletActivity.html'"></span>
      </a>
    </div>

    <div class="list card" ng-if="!walletsBtc[0] && !walletsBch[0]">
      <div class="item item-icon-right item-heading">
        <span translate>Wallets</span>
      </div>
      <a ui-sref="tabs.add" class="item item-icon-left item-big-icon-left item-icon-right next-step">
        <i class="icon big-icon-svg">
          <img src="img/icon-wallet.svg" class="bg wallet icon-create-wallet"/>
        </i>
        <span translate>Create bitcoin wallet</span>
        <i class="icon bp-arrow-right"></i>
      </a>
    </div>

    <div class="list card" ng-if="walletsBtc[0]">
      <div class="item item-icon-right item-heading">
        <img class="wallet-coin-logo" src="img/icon-bitcoin.svg" width="18">
        <span translate>Bitcoin Wallets</span>
        <a ui-sref="tabs.add"><i class="icon ion-ios-plus-empty list-add-button"></i></a>
      </div>
      <div>
        <a ng-repeat="wallet in walletsBtc track by $index"
           class="item item-sub item-icon-left item-big-icon-left item-icon-right wallet"
           ng-click="openWallet(wallet)">
          <span ng-include="'views/includes/walletList.html'"></span>
        </a>
      </div>
    </div>

    <div class="list card" ng-if="walletsBch[0]">
      <div class="item item-icon-right item-heading">
        <img class="wallet-coin-logo" src="img/bitcoin-cash-logo.svg" width="22">
        <span translate>Bitcoin Cash Wallets</span>
        <a ui-sref="tabs.add({coin:'bch'})"><i class="icon ion-ios-plus-empty list-add-button"></i></a>
      </div>
      <div>
        <a ng-repeat="wallet in walletsBch track by $index"
           class="item item-sub item-icon-left item-big-icon-left item-icon-right wallet"
           ng-click="openWallet(wallet)">
          <span ng-include="'views/includes/walletList.html'"></span>
        </a>
      </div>
    </div>

    <div class="ng-hide list card" ng-show="walletsBtc[0] && bitpayCardItems.length>0" ng-include="'views/includes/bitpayCardsCard.html'"></div>
    <div class="ng-hide list card" ng-show="walletsBtc[0] && buyAndSellItems.length>0" ng-include="'views/includes/buyAndSellCard.html'"></div>
    <div class="ng-hide list card" ng-show="homeIntegrations.length>0" ng-include="'views/includes/homeIntegrations.html'"></div>
    <div class="ng-hide list card" ng-show="nextStepsItems.length>0 && !isWindowsPhoneApp" ng-include="'views/includes/nextSteps.html'"></div>

  </ion-content>
</ion-view>
